package com.ds.lens.data.common.umpapi;

import feign.Headers;
import feign.Param;
import feign.RequestLine;

import java.util.List;


public interface UmpMetricClient {

    @Headers({"Content-Type: application/json", "Accept: application/json"})
    @RequestLine("GET /api/v1/query?query={queryString}")
    UmpMetricOutVO<VectorMetricOutBO> getCurrentMetrics(@Param(value = "queryString") String queryString) throws Exception;

    @Headers({"Content-Type: application/json", "Accept: application/json"})
    @RequestLine("GET /api/v1/label/__name__/values")
    UmpMetricOutVO<List<String>> getMetricNames() throws Exception;

    @Headers({"Content-Type: application/json", "Accept: application/json"})
    @RequestLine("GET /api/v1/labels")
    UmpMetricOutVO<List<String>> metricLabels() throws Exception;


    @Headers({"Content-Type: application/json", "Accept: application/json"})
    @RequestLine("GET /api/v1/query_range?query={queryString}&start={start}&end={end}&step={step}")
    UmpMetricOutVO<MatrixMetricOutBO> getMetricsByCondition(@Param(value = "queryString") String queryString,
                                                            @Param(value = "start") Double start,
                                                            @Param(value = "end") Double end,
                                                            @Param(value = "step") Long step) throws Exception;
}
